import React from 'react';
import { connect, } from 'react-redux';
import { getData, } from '../../../redux/actions/action';

const TestReduxSaga = (props) => {

  const onClickGetData = () => {
    props.getData();
  };

  return (
    <div>
      <button onClick={ onClickGetData }>测试 redux-saga</button>
    </div>
  );
};

const mapStateToProps = (state) => ({
  ...state,
});

const mapDispatchToProps = {
  getData,
};

export default connect(mapStateToProps, mapDispatchToProps)(TestReduxSaga);
